package com.itasura.simplefactory;

/**
 * @author sailor wang
 * @date 2018/11/24 4:40 PM
 * @description
 */
public class Factory {
    public static Product create(CarType type) {
        switch (type) {
            case BMW:
                return new BMWCar();
            case BENZ:
                return new BenzCar();
            default:
                return null;
        }
    }
}